﻿using System;
using System.Data;

namespace TimKen.BussLogic
{
    /// <summary>
    /// 语言业务逻辑类
    /// </summary>
    public class LanguageManager
    {
        private readonly TimKen.DataAccess.LanguageDAO dal = new TimKen.DataAccess.LanguageDAO();
        public LanguageManager()
        { }
        #region  成员方法

        /// <summary>
        /// 是否存在该记录
        /// </summary>
        public bool Exists(int LanguageID)
        {
            return dal.Exists(LanguageID);
        }

        /// <summary>
        /// 增加一条数据
        /// </summary>
        public int Add(TimKen.DataEntity.Language model)
        {
            return dal.Add(model);
        }

        /// <summary>
        /// 更新一条数据
        /// </summary>
        public void Update(TimKen.DataEntity.Language model)
        {
            dal.Update(model);
        }

        /// <summary>
        /// 删除一条数据
        /// </summary>
        public void Delete(int LanguageID)
        {
            dal.Delete(LanguageID);
        }

        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public TimKen.DataEntity.Language GetModel(int LanguageID)
        {

            return dal.GetModel(LanguageID);
        }
 
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetList(string strWhere)
        {
            return dal.GetList(strWhere);
        }

        /// <summary>
        /// 获得数据列表
        /// </summary>
        public DataSet GetAllList()
        {
            return GetList("");
        }
        #endregion  成员方法
    }
}
